# ${item.getLogicName()}(${item.getCodeName()})  <!-- {docsify-ignore-all} -->
<%if(item.getMemo()){%>

${ctx.ignoreNullString(item.getMemo())}
<%}%>

## 属性
|    中文名col150 | 属性名称col200           | 类型col200     | 长度col100    |允许为空col100    |  备注col500  |
| --------   |------------| -----  | -----  | :----: | -------- |
<% if (item.getAllPSDEFields()) {
  item.getAllPSDEFields().sort {it.getName()}.each{ field -> %>\
|${field.getLogicName()}<%= field.isKeyDEField() ? '<sup class="footnote-symbol"><font color=orange>[PK]</font></sup>' : '' %><%\
if(field.getPSSysSequence()){%><sup class="footnote-symbol">[[序列]](index/sequence_index#${field.getPSSysSequence().getCodeName()})</sup><%}%>|${field.getName()}|<%
if (field.getPSCodeList() && field.getPSCodeList().getPSSystemModule() && field.getPSCodeList().getCodeListType() == 'STATIC') {%>[<%}%><%= ctx.text('DEFDataType',field.getDataType()) %><% if (field.getPSCodeList() && field.getPSCodeList().getPSSystemModule() && field.getPSCodeList().getCodeListType() == 'STATIC') {%>](index/dictionary_index#${field.getPSCodeList().getCodeName()} "${field.getPSCodeList().getName()}")<%}%>|<%=field.getLength()>0?field.getLength():''%>|<%= (field.isAllowEmpty()) ? "是" : "否" %>|${ctx.tableString(field.getMemo())}|
<% }} %>
<% if(item.getUnionKeyValuePSDEFields()){%>\
<p class="panel-title"><b>联合主键</b></p>

<% item.getUnionKeyValuePSDEFields().each{ field -> %>\
  * `${field.getLogicName()}(${field.getName()})`
<% }}%>\
<% if(item.getAllPSDEDBIndices()){%>\

###### 索引

<el-row>
<el-tabs v-model="show_index">

<% item.getAllPSDEDBIndices().each{ dbIndex -> %>\
<el-tab-pane label="${dbIndex.getName()}" name="index_${dbIndex.getCodeName()}">

|    中文名col150 | 属性名称col200           | 包含属性col100 | 排序方向col100 | 索引长度col100 | 备注col600 |
| --------   |------------| -----  | -----  | :----: | -------- |
<% if (dbIndex.getAllPSDEDBIndexFields()) {
  dbIndex.getAllPSDEDBIndexFields().sort {it.getName()}.each{ detail ->
  def field = detail.getPSDEField() %>\
|${field.getLogicName()}<%= field.isKeyDEField() ? '<sup class="footnote-symbol"><font color=orange>[PK]</font></sup>' : '' %><%\
if(field.getPSSysSequence()){%><sup class="footnote-symbol">[[序列]](index/sequence_index#${field.getPSSysSequence().getCodeName()})</sup><%}%>|${field.getName()}|\
${detail.isIncludeMode()}|${ctx.text('SortDir',detail.getSortDir())}|${detail.getLength()}||
<% }} %>\

</el-tab-pane>
<% } %>\

</el-tabs>
</el-row>
<% } %>\
<% if(item.getAllPSDEFGroups()){%>\

###### 属性组

<el-row>
<el-tabs v-model="show_field_group">

<% item.getAllPSDEFGroups().each{ group -> %>\
<el-tab-pane label="${group.getName()}" name="field_group_${group.getCodeName()}">

|    中文名col150 | 属性名称col200           | 类型col200     | 长度col100    |允许为空col100    |  备注col500  |
| --------   |------------| -----  | -----  | :----: | -------- |
<% if (group.getPSDEFGroupDetails()) {
  group.getPSDEFGroupDetails().sort {it.getOrderValue()}.each{ detail ->
  def field = detail.getPSDEField() %>\
|${field.getLogicName()}<%= field.isKeyDEField() ? '<sup class="footnote-symbol"><font color=orange>[PK]</font></sup>' : '' %><%\
if(field.getPSSysSequence()){%><sup class="footnote-symbol">[[序列]](index/sequence_index#${field.getPSSysSequence().getCodeName()})</sup><%}%>|${field.getName()}|<%
if (field.getPSCodeList() && field.getPSCodeList().getPSSystemModule() && field.getPSCodeList().getCodeListType() == 'STATIC') {%>[<%}%><%= ctx.text('DEFDataType',field.getDataType()) %><% if (field.getPSCodeList() && field.getPSCodeList().getPSSystemModule() && field.getPSCodeList().getCodeListType() == 'STATIC') {%>](index/dictionary_index#${field.getPSCodeList().getCodeName()} "${field.getPSCodeList().getName()}")<%}%>|<%=field.getLength()>0?field.getLength():''%>|<%= (field.isAllowEmpty()) ? "是" : "否" %>|${ctx.tableString(field.getMemo())}|
<% }} %>\

</el-tab-pane>
<% } %>\

</el-tabs>
</el-row>
<% } %>\
<% if (item.getMajorPSDERs() || item.getMinorPSDERs()) {%>\

## 关系

<el-row>
<el-tabs v-model="show_der">
<% if (item.getMajorPSDERs()) {%>\
<el-tab-pane label="主关系" name="major">

| 名称col350     |   从实体col200 | 关系类型col200     |   备注col500  |
| -------- |---------- |------------|----- |
<% item.getMajorPSDERs().each{ der -> %>\
|[${der.getName()}](der/${der.getName()})|[${der.getMinorPSDataEntity().getDisplayName()}](module/${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()}/${der.getMinorPSDataEntity().getCodeName()})|${ctx.text('DERType',der.getDERType())}|${ctx.tableString(der.getMemo())}|
<% } %>

</el-tab-pane>
<% } %>\
<% if (item.getMinorPSDERs()) {%>\
<el-tab-pane label="从关系" name="minor">

|  名称col350   | 主实体col200   | 关系类型col200   |    备注col500  |
| -------- |---------- |-----------|----- |
<% item.getMinorPSDERs().each{ der -> %>\
|[${der.getName()}](der/${der.getName()})|[${der.getMajorPSDataEntity().getDisplayName()}](module/${der.getMajorPSDataEntity().getPSSystemModule().getCodeName()}/${der.getMajorPSDataEntity().getCodeName()})|${ctx.text('DERType',der.getDERType())}|${ctx.tableString(der.getMemo())}|
<% } %>\

</el-tab-pane>
<% } %>\
</el-tabs>
</el-row>
<% }%>\
<% if (item.getAllPSDEMaps()) {%>\

## 映射
| 名称col150    | 映射实体col200   | 备注col900  |
| -------- |----------  |----- |
<% item.getAllPSDEMaps().each{ map -> %>\
|[${map.getName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/demap/${map.getCodeName()})|[${map.getDstPSDE().getDisplayName()}](module/${map.getDstPSDE().getPSSystemModule().getCodeName()}/${map.getDstPSDE().getCodeName()})|${ctx.tableString(map.getMemo())}|
<% }}%>\

## 行为
| 中文名col200    | 代码名col150    | 类型col150    | 事务col100   | 批处理col100   | 附加操作col100  | 插件col150    |  备注col300  |
| -------- |---------- |----------- |:----:|:----:|---------| ----- | ----- |
<% if (item.getAllPSDEActions()) {
  item.getAllPSDEActions().sort {it.getName()}.each{ action -> %>\
|${action.getLogicName()}|${action.getCodeName()}|<%if (action.getActionType()=='DELOGIC' && action.getPSDELogic()){%>[<%}%>${ctx.text('DEActionType',action.getActionType())}<%if (action.getActionType()=='DELOGIC' && action.getPSDELogic()){%>](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/logic/${action.getPSDELogic().getCodeName()} "${action.getPSDELogic().getLogicName()}")<%}%>|<%= ctx.text('DEActionTSMode',action.getTransactionMode()) %>|<%= ctx.text('DEActionBatchMode',action.getBatchActionMode()) %>|<% if (action.hasActionLogics()){%>[附加操作](index/action_logic_index#${item.getCodeName()}_${action.getName()})<%}%>|${action.getPluginLink()}|${ctx.tableString(action.getMemo())}|
<% }} %>\
<% if (item.getAllPSDELogics()) {%>\

## 处理逻辑
| 中文名col200    | 代码名col150    | 子类型col150    | 插件col200    |  备注col550  |
| -------- |---------- |----------- |------------|----------|
<%   item.getAllPSDELogics().sort {it.getLogicName()}.each{ logic -> %>\
|[${logic.getLogicName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/logic/${logic.getCodeName()})|${logic.getCodeName()}|${ctx.text('LogicSubType',logic.getLogicSubType())}||${ctx.tableString(logic.getMemo())}|
<% }} %>\
<% if (item.getMainStatePSDEFields()) {%>\

## 主状态控制

<p class="panel-title"><b>控制属性</b></p>

<% if (item.getMainStatePSDEFields()) {
  item.getMainStatePSDEFields().each{ field -> %>\
* `${field.getLogicName()}(${field.getName()})` <%if (field.getPSCodeList() && field.getPSCodeList().getPSSystemModule() && field.getPSCodeList().getCodeListType() == 'STATIC') {%>[${field.getPSCodeList().getName()}](index/dictionary_index#${field.getPSCodeList().getCodeName()} "${field.getPSCodeList().getName()}")<%}%>
<% }}%>
<%
boolean checkMainStteField = true
def mainFieldSize = item.getMainStatePSDEFields().size()
item.getMainStatePSDEFields().each{field ->
    if(!(field.getPSCodeList() && field.getPSCodeList().getPSCodeItems())){
       checkMainStteField = false
    }
} %>
<% if (checkMainStteField) {%>

<p class="panel-title"><b>操作标识分布</b></p>
<br>
<table>
  <tr>
    <th<%if(mainFieldSize>1){%> rowspan="${mainFieldSize}"<%}%>>操作标识col350</th>
<%  colspan = 1

    if(mainFieldSize>1){
        item.getMainStatePSDEFields().eachWithIndex{field,index ->
            if(index > 0  && field.getPSCodeList() && field.getPSCodeList().getPSCodeItems()){
                colspan = colspan * field.getPSCodeList().getPSCodeItems().size()
            }
        }
    }
    item.getMainStatePSDEFields().get(0).getPSCodeList().getPSCodeItems().each{ codeitem->
        out << String.format('    <th')
        if(mainFieldSize>1){
            out << String.format(' colspan="%s"',colspan)
        }
        out << String.format('>%scol150</th>\n',codeitem.getText())
    }
%>\
    <th<%if(mainFieldSize>1){%> rowspan="${mainFieldSize}"<%}%>>备注col600</th>
  </tr>
<%if(mainFieldSize>1){%>\
  <tr>
<%  colspan = 1
    if(mainFieldSize>2){
        item.getMainStatePSDEFields().eachWithIndex{field,index ->
            if(index > 1  && field.getPSCodeList() && field.getPSCodeList().getPSCodeItems()){
                colspan = colspan * field.getPSCodeList().getPSCodeItems().size()
            }
        }
    }
    item.getMainStatePSDEFields().get(0).getPSCodeList().getPSCodeItems().each{ codeitem->
        item.getMainStatePSDEFields().get(1).getPSCodeList().getPSCodeItems().each{ seccodeitem->
            out << String.format('    <th colspan="%s">%scol150</th>\n',colspan,seccodeitem.getText())
        }
    }
%>\
  </tr>
<%}%>\
<%if(mainFieldSize>2){%>\
  <tr>
<%  colspan = 1
    item.getMainStatePSDEFields().get(0).getPSCodeList().getPSCodeItems().each{ codeitem->
        item.getMainStatePSDEFields().get(1).getPSCodeList().getPSCodeItems().each{ seccodeitem->
            item.getMainStatePSDEFields().get(2).getPSCodeList().getPSCodeItems().each{ thirdcodeitem->
                out << String.format('    <th colspan="%s">%scol150</th>\n',colspan,thirdcodeitem.getText())
            }
        }
    }
%>\
  </tr>
<%}%>\
<% if (item.getAllPSDEOPPrivs()) {
  item.getAllPSDEOPPrivs().sort {it.getLogicName()}.each{ oppriv -> %>\
  <tr>
    <td>${oppriv.getLogicName()}(${oppriv.getName()})<%if(oppriv.getMapPSDER()){%><br><a href ="#/der/${oppriv.getMapPSDER().getName()}">${oppriv.getMapPSDER().getName()}</a><%}%></td>
<% item.getMainStatePSDEFields().get(0).getPSCodeList().getPSCodeItems().each{ codeitem->

    if(mainFieldSize == 1)  {
        Object state = null
        for (int i = 0; i <= 1; i++) {
			String strTag = String.format("%s", ((i == 0) ? codeitem.getValue() : "*"));
		    if(item.getMainStateMap().containsKey(strTag)){
		        state = item.getMainStateMap().get(strTag)
		        break
		    }
		}
		if(state){
		    boolean allow = true
            Object op = state.getPSDEMainStateOPPrivs().find{stateoppriv -> stateoppriv.getPSDEOPPriv().getName().equals(oppriv.getName())}
            if(op){
                allow = state.isOPPrivAllowMode() ? true : false
            }else{
                allow = state.isOPPrivAllowMode() ? false : true
            }
            if(allow){
                out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
            }else{
                out << String.format('    <td align="center">%s</td>\n','')
            }
		}else{
            out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
		}
    }
    if(mainFieldSize == 2)  {
        boolean find = false
        for (int i = 0; i <= 1; i++) {
            String strTag = String.format("%s", ((i == 0) ? codeitem.getValue() : "*"));
            item.getMainStatePSDEFields().get(1).getPSCodeList().getPSCodeItems().each{ seccodeitem ->
                Object state = null
                for (int j = 0; j <= 1; j++) {
                    String strTag2 = String.format("%s__%s", strTag, ((j == 0) ? seccodeitem.getValue() : "*"));
                    if(item.getMainStateMap().containsKey(strTag2)){
                        state = item.getMainStateMap().get(strTag2)
                        break
                    }
                }
                if(state){
                    find = true
                    boolean allow = true
                    Object op = state.getPSDEMainStateOPPrivs().find{stateoppriv -> stateoppriv.getPSDEOPPriv().getName().equals(oppriv.getName())}
                    if(op){
                        allow = state.isOPPrivAllowMode() ? true : false
                    }else{
                        allow = state.isOPPrivAllowMode() ? false : true
                    }
                    if(allow){
                        out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
                    }else{
                        out << String.format('    <td align="center">%s</td>\n','')
                    }
                }else{
                    if(i == 1)
                        out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
                }
            }
            if(find)
                break
        }
    }
    if(mainFieldSize == 3)  {
        boolean find = false
        boolean find2 = false
        for (int i = 0; i <= 1; i++) {
            String strTag = String.format("%s", ((i == 0) ? codeitem.getValue() : "*"));
            item.getMainStatePSDEFields().get(1).getPSCodeList().getPSCodeItems().each{ seccodeitem ->
                find = false
                find2 = false
                for (int j = 0; j <= 1; j++) {
                    String strTag2 = String.format("%s__%s", strTag, ((j == 0) ? seccodeitem.getValue() : "*"));
                    item.getMainStatePSDEFields().get(2).getPSCodeList().getPSCodeItems().each{ thirdcodeitem ->
                        Object state = null
                        for (int k = 0; k <= 1; k++) {
                            String strTag3 = String.format("%s__%s", strTag2, ((k == 0) ? thirdcodeitem.getValue() : "*"));
                            if(item.getMainStateMap().containsKey(strTag3)){
                                state = item.getMainStateMap().get(strTag3)
                                break
                            }
                        }
                        if(state){
                            find = true
                            find2 = true
                            boolean allow = true
                            Object op = state.getPSDEMainStateOPPrivs().find{stateoppriv -> stateoppriv.getPSDEOPPriv().getName().equals(oppriv.getName())}
                            if(op){
                                allow = state.isOPPrivAllowMode() ? true : false
                            }else{
                                allow = state.isOPPrivAllowMode() ? false : true
                            }
                            if(allow){
                                out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
                            }else{
                                out << String.format('    <td align="center">%s</td>\n','')
                            }
                        }else{
                            if(i == 1 && j == 1)
                                out << String.format('    <td align="center">%s</td>\n','<i class="fa fa-check"></i>')
                        }
                    }
                    if(find2)
                        break
                }
            }
            if(find)
                break
        }
    }%>\
<%}%>\
    <td>${ctx.tableString(oppriv.getMemo())}</td>
  </tr>
<% }} %>\

</table>

<% } else { %>
> 控制属性未配置代码表，或者代码表未配置代码项
<% } %>\
<% } %>\
<% if (item.getAllPSDEMSLogics()) {%>\

## 主状态迁移
| 中文名col200    | 代码名col150    | 子类型col150    | 插件col200    |  备注col550  |
| -------- |---------- |----------- |------------|----------|
<%   item.getAllPSDEMSLogics().sort {it.getLogicName()}.each{ mslogic -> %>\
|[${mslogic.getLogicName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/mslogic/${mslogic.getCodeName()})|${mslogic.getCodeName()}|||${ctx.tableString(mslogic.getMemo())}|
<% }} %>\
<% if (item.getAllPSDEUtils()) { %>\

## 功能配置
| 中文名col200    | 功能类型col150    | 功能实体col200 |  备注col700|
| --------  | :----:    | ---- |----- |
<%  item.getAllPSDEUtils().each{ util -> %>\
|${util.getDisplayName()}|${ctx.text('DEUtilType',util.getUtilType())}|<%if(util.getUtilPSDE()){%>[${util.getUtilPSDE().getDisplayName()}](module/${util.getUtilPSDE().getPSSystemModule().getCodeName()}/${util.getUtilPSDE().getCodeName()})<%}%>|${ctx.tableString(util.getMemo())}|
<% }} %>\
<% if (item.getAllPSDEDataQueries()) { %>\

## 数据查询
| 中文名col200    | 代码名col150    | 默认查询col100 | 权限使用col100 | 自定义SQLcol100 |  备注col600|
| --------  | --------   | :----:  |:----:  | :----:  |----- |
<%  item.getAllPSDEDataQueries().each{ query -> %>\
|[${query.getDisplayName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/query/${query.getCodeName()})|${query.getName()}|<%= (query.isDefaultMode()) ? "是" : "否" %>|<%= (query.isPrivQuery()) ? "是" : "否" %> |<%= (query.isCustomCode()) ? "是" : "否" %> |${ctx.tableString(query.getMemo())}|
<% }} %>\
<% if (item.getAllPSDEDataSets()) { %>\

## 数据集合
| 中文名col200  | 代码名col150  | 类型col100 | 默认集合col100 |   插件col200|   备注col500|
| --------  | --------   | :----:   | :----:   | ----- |----- |
<%   item.getAllPSDEDataSets().each{ dataset -> %>\
|[${dataset.getDisplayName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/dataset/${dataset.getCodeName()})|${dataset.getName()}|<%
    if(dataset.getDataSetType() == 'DELOGIC'){
        out << String.format('[%s](module/%s/%s/logic/%s)',ctx.text('DEDataSetType',dataset.getDataSetType()),item.getPSSystemModule().getCodeName(),item.getCodeName(),dataset.getPSDELogic().getCodeName())
    }else{
        out << ctx.text('DEDataSetType',dataset.getDataSetType())
    }
%>|<%= (dataset.isDefaultMode()) ? "是" : "否" %>|${dataset.getPluginLink()}|${ctx.tableString(dataset.getMemo())}|
<% }} %>\
<% if (item.getAllPSDEUserRoles()) { %>\

## 数据权限

<%   item.getAllPSDEUserRoles().each{ derole -> %>\
##### ${derole.getName()} :id=${item.getCodeName()}-${derole.getRoleTag()}

<p class="panel-title"><b>数据范围</b></p>

<%if(derole.isAllData()){%>\
* `全部数据`
<% }else { %>\
<%if(derole.isEnableOrgDR()){%>\
* `组织范围` ：<%if((1&derole.getOrgDR())>0){%> <i class="fa fa-check-square"/></i> 当前组织<%}%><%if((2&derole.getOrgDR())>0){%> <i class="fa fa-check-square"/></i> 上级组织<%}%><%if((4&derole.getOrgDR())>0){%> <i class="fa fa-check-square"/></i> 下级组织<%}%>
<%}%>\
<%if(derole.isEnableSecDR()){%>\
* `部门范围` ：<%if((1&derole.getSecDR())>0){%> <i class="fa fa-check-square"/></i> 当前部门<%}%><%if((2&derole.getSecDR())>0){%> <i class="fa fa-check-square"/></i> 上级部门<%}%><%if((4&derole.getSecDR())>0){%> <i class="fa fa-check-square"/></i> 下级部门<%}%>
<%}%>\
<%if(derole.isEnableSecBC()){%>\
* `业务条线` ：`${derole.getSecBC()}`
<%}%>\
<%if(derole.getPSDEDataSet()){%>\
* `数据集合` ：[${derole.getPSDEDataSet().getDisplayName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}#数据集合)
<%}%>\
<%if(derole.getCustomCond()){%>\
* `自定义条件` ：`${derole.getCustomCond()}`
<%}%>\
<%if(!derole.isEnableOrgDR() && !derole.isEnableSecDR() && !derole.isEnableSecBC() && !derole.getPSDEDataSet() && !derole.getCustomCond()){%>\
* `无`
<%}%>\
<% } %>\

<p class="panel-title"><b>数据能力</b></p>

<% if (derole.getPSDEUserRoleOPPrivs()) {
  derole.getPSDEUserRoleOPPrivs().each{ i -> %>\
* `${i.getPSDEOPPriv().getName()}<%if(i.getPSDEOPPriv().getMapPSDataEntity()){%>(${i.getPSDEOPPriv().getMapPSDataEntity().getLogicName()}(${i.getPSDEOPPriv().getMapPSDEOPPrivName()}))<%}%>`
<% }}%>


<% }} %>\
<% if (item.getAllPSDENotifies()) {%>\
## 消息通知

|    中文名col200   | 代码名col150       |  消息队列col200   |  消息模板col200 |  通知目标col150     |  备注col350  |
|------------| -----   |  -------- | -------- |-------- |-------- |
<%item.getAllPSDENotifies().each{ notify ->  %>\
|[${notify.getName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/notify/${notify.getCodeName()})|${notify.getCodeName()}|[${notify.getPSSysMsgQueue().getName()}](index/notify_index)|[${notify.getPSSysMsgTempl().getName()}](index/notify_index#${notify.getPSSysMsgTempl().getCodeName()})|<%notify.getPSDENotifyTargets()?.each {target ->%>${target.getName()} <%}%>|<%= ctx.tableString(notify.getMemo()) %>|
<%}}%>\
<% if (item.getAllPSDEFields()) {%>\

## 搜索模式
|   搜索表达式col350   |    属性名col200    |    搜索模式col200        |备注col500  |
| -------- |------------|------------|------|
<%  item.getAllPSDEFields().each{ field ->
    field.getAllPSDEFSearchModes().each{ searchfield ->
  %>\
|${searchfield.getName()}|${field.getLogicName()}|${searchfield.getValueOP()}|<%= ctx.tableString(searchfield.getMemo()) %>|
<% }}} %>\
<% if (item.getAllPSAppDEUIActions()) {%>\

## 界面行为
|  中文名col200 |  代码名col150 |  标题col100   |     处理目标col100   |    处理类型col200        |  备注col500       |
| --------| --------| -------- |------------|------------|------------|
<% item.getAllPSAppDEUIActions().each{ deUIAction -> %>\
| ${deUIAction.getName()} | ${deUIAction.getCodeName()} | ${deUIAction.getCaption()} |${ctx.text('UIActionTarget',deUIAction.getActionTarget())}|<%
if('BACKEND' == deUIAction.getUIActionMode()){
    if(deUIAction.getPSAppDEMethod()){
        out << '<details><summary>' << ctx.text('UIActionType',deUIAction.getUIActionMode()) << '</summary>'
        out << '[' << deUIAction.getPSAppDEMethod().getName() <<'](#行为)'
    } else {
        out << ctx.text('UIActionType',deUIAction.getUIActionMode())
    }
} else if('SYS' == deUIAction.getUIActionMode()){
        out << ctx.text('UIActionType',deUIAction.getUIActionMode())
} else if('FRONT' == deUIAction.getUIActionMode()){
    if('OTHER' == deUIAction.getFrontProcessType()){
        out << ctx.text('UIActionFrontType',deUIAction.getFrontProcessType())
    } else {
        out << '<details><summary>' << ctx.text('UIActionFrontType',deUIAction.getFrontProcessType()) << '</summary>'
    }
    if('WIZARD' == deUIAction.getFrontProcessType()||'TOP' == deUIAction.getFrontProcessType()){
        if(deUIAction.getFrontPSAppView()){
            out << '[' << deUIAction.getFrontPSAppView().getCaption() <<'](app/view/' << deUIAction.getFrontPSAppView().getCodeName() << ')'
        }
    }
    if('OPENHTMLPAGE' == deUIAction.getFrontProcessType()){
        if(deUIAction.getHtmlPageUrl()){
            out << '*' << deUIAction.getHtmlPageUrl() <<'*'
        }
    }
    if('PRINT' == deUIAction.getFrontProcessType() && deUIAction.getPSAppDEPrint()){
        out << '[' << deUIAction.getPSAppDEPrint().getName() <<']()'
    }
    if('DATAIMP' == deUIAction.getFrontProcessType() && deUIAction.getPSAppDEDataImport()){
        out << '[' << deUIAction.getPSAppDEDataImport().getName() <<']()'
    }
    if('DATAEXP' == deUIAction.getFrontProcessType() && deUIAction.getPSAppDEDataExport()){
        out << '[' << deUIAction.getPSAppDEDataExport().getName() <<']()'
    }
    if('OTHER' != deUIAction.getFrontProcessType()){
            out << '</details>'
    }
} else if('WFFRONT' == deUIAction.getUIActionMode()){
    out << ctx.text('UIActionType',deUIAction.getUIActionMode())
} else if('WFBACKEND' == deUIAction.getUIActionMode()){
    out << ctx.text('UIActionType',deUIAction.getUIActionMode())
} else if('CUSTOM' == deUIAction.getUIActionMode()){
    out << ctx.text('UIActionType',deUIAction.getUIActionMode())
}
%>|<%= ctx.tableString(deUIAction.getMemo()) %>|
<% }} %>\
<% if (item.getAllPSAppDEUILogics()) {%>\

## 界面逻辑
|  中文名col200 | 代码名col150 | 备注col900 |
| --------|--------|--------|
<% item.getAllPSAppDEUILogics().sort {it.getName()}.each{ uilogic -> %>\
|[${uilogic.getName()}](module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}/uilogic/${uilogic.getCodeName()})|${uilogic.getCodeName()}|<%= ctx.tableString(uilogic.getMemo()) %>|
<% }} %>\
<% if (item.getAllPSDEDataImports()) {%>\

## 导入模式
<% item.getAllPSDEDataImports().each{ dataImport -> %>\

* **${dataImport.getName()}**
<%if(item.getMemo()){%>

${ctx.ignoreNullString(item.getMemo())}
<%}%>

<el-descriptions direction="vertical" :column="${dataImport.getPSDEDataImportItems()?.size()}" :size="size" border>
<% dataImport.getPSDEDataImportItems()?.each{ item ->   %>\
<el-descriptions-item label="<%= (item.getCaption()) ? item.getCaption() : item.getName() %>">-</el-descriptions-item>
<% } %>\
</el-descriptions>
<% }} %>\
<% if (item.getAllPSDEDataExports()) {%>\

## 导出模式
<% item.getAllPSDEDataExports().each{ dataExport -> %>\

* **${dataExport.getName()}**
<%if(item.getMemo()){%>

${ctx.ignoreNullString(item.getMemo())}
<%}%>

<el-descriptions direction="vertical" :column="${dataExport.getPSDEDataExportItems()?.size()}" :size="size" border>
<% dataExport.getPSDEDataExportItems()?.each{ item ->   %>\
<el-descriptions-item label="<%= (item.getCaption()) ? item.getCaption() : item.getName() %>">-</el-descriptions-item>
<% } %>\
</el-descriptions>
<% }} %>\

<div style="display: block; overflow: hidden; position: fixed; top: 140px; right: 100px;">

##### 导航
<el-anchor >
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=属性`">
  属性
</el-anchor-link>
<% if (item.getMajorPSDERs() || item.getMinorPSDERs()) {%>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=关系`">
  关系
</el-anchor-link>
<%}%>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=行为`">
  行为
</el-anchor-link>
<% if (item.getAllPSDELogics()) {%>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=处理逻辑`">
  处理逻辑
</el-anchor-link>
<%}%>\
<% if (item.getMainStatePSDEFields()) {%>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=主状态控制`">
  主状态控制
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEMSLogics()) {%>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=主状态迁移`">
  主状态迁移
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEUtils()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=功能配置`">
  功能配置
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEDataQueries()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=数据查询`">
  数据查询
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEDataSets()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=数据集合`">
  数据集合
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEUserRoles()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=数据权限`">
  数据权限
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDENotifies()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=消息通知`">
  消息通知
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEFields()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=搜索模式`">
  搜索模式
</el-anchor-link>
<%}%>\
<% if (item.getAllPSAppDEUIActions()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=界面行为`">
  界面行为
</el-anchor-link>
<%}%>\
<% if (item.getAllPSAppDEUILogics()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=界面逻辑`">
  界面逻辑
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEDataImports()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=导入模式`">
  导入模式
</el-anchor-link>
<%}%>\
<% if (item.getAllPSDEDataExports()) { %>\
<el-anchor-link :href="`#/module/${item.getPSSystemModule().getCodeName()}/${item.getCodeName()}?id=导出模式`">
  导出模式
</el-anchor-link>
<%}%>\
</el-anchor>
</div>

<script>
 const { createApp } = Vue
  createApp({
    data() {
      return {
<% if (item.getMajorPSDERs() || item.getMinorPSDERs()) {
    def show
    if(item.getMajorPSDERs()) {
        show = 'major'
    } else {
        show = 'minor'
    }
    out << String.format("show_der:'%s',",show)
}%>
<% if (item.getAllPSDEFGroups()) {
    out << String.format("show_field_group:'field_group_%s',",item.getAllPSDEFGroups().get(0).getCodeName())
}%>
<% if (item.getAllPSDEDBIndices()) {
    out << String.format("show_index:'index_%s',",item.getAllPSDEDBIndices().get(0).getCodeName())
}%>
      }
    },
    methods: {
    }
  }).use(ElementPlus).mount('#app')
</script>